package com.hhit.collaborative_learning.dao;

import java.util.ArrayList;
import java.util.HashMap;

import com.hhit.collaborative_learning.entity.Blog;
import com.hhit.collaborative_learning.entity.BlogCommentPage;
import com.hhit.collaborative_learning.entity.BlogExpert;
import com.hhit.collaborative_learning.entity.BlogPage;
import com.hhit.collaborative_learning.entity.BlogRightPage;
import com.hhit.collaborative_learning.entity.Question;
import com.hhit.collaborative_learning.entity.QuestionPage;
import com.hhit.collaborative_learning.entity.User;

public interface PublicDao {
	public User validateLogin(String username, String password);

	public User register(String username, String password, String email,
			String usericon, String nickName);

	public boolean verityNameAndEmail(String username, String email);

	public boolean findPWd(String username, String password, String email);

	public BlogPage getBlog(String type, String currentPage, String orderBy);

	public ArrayList<User> getRecomExpert(String type);

	public BlogPage getExpertBlog(String type, String currentPage);

	public User getUserInfo(int userId);

	public HashMap<String, Object> getBlogById(int blogId);

	public BlogPage getBlogByUserId(int userId, String currentPage);

	public String saveBlog(boolean isFirst, String blogName,
			String blogContent, String blogDesc, String category,
			String canComment, String isTop, String tag, String userId,
			String isDelete, String blogId, String type);
	
	public BlogPage getBlogByUserIdTypeIsDelete(int userId,String type,String isDelete,String currentPage);
	public boolean manageBlog(String action,int blogId); 
	public boolean applyExpert(int userId,String realname,String realicon,String mobile,String category,String tag,String qq,String address,String description);
	public int getExpertApplyState(int userId);
	public BlogExpert getExpertApplyResult(int userId);
	public void deleteFailApplyResult(int userId);
	public String getBlog(int blogId);
	public String setTop(int blogId,int userId,boolean hasRight);
	public void deleteCompletely(int blogId);
	public HashMap<String, Object> getAttention(int userId);
	public boolean cancelFocus(int userId,String c_userId);
	public boolean addFocus(int userId,String a_userId);
	public String addFocus2(int userId,String a_userId);
	public boolean judgeFocus(int userId,String a_userId);
	public String getComment(int blogId,String currentPage);
	public boolean saveComment(int userId,int blogId,String content,int parentId);
	public boolean deleteComment(int comId,int blogId);
	public boolean digBlog(int user,int blogId,String action);
	public BlogCommentPage getCommentByPage(int userId,String type,String currentPage);
	public int getUserIdByUserNickName(String userNickName);
	public String getBlogRight(int userId);
	public BlogRightPage getBlogRightPage(String category,String type,String choose,String currrentPage);
	public String setPrime(int blogId);
	public boolean examine(String type,int userId,String time);
	public boolean submitExamine(int con1,int con2,int con3,int userId,int applyState);
	public QuestionPage getQuestion(String type,String orderby,String currentPage);
	public boolean submitQuestion(String title,String content,String tag,String point,int userId);
	public QuestionPage getMyQuestion(String type,int userId,String currentPageStr);
}
